<!--
 * @Author: hucc
 * @Date: 2021-09-17 14:20:00
 * @LastEditors: hucc
 * @LastEditTime: 2021-09-23 21:22:45
 * @Description: 封装底部组件
-->
<template>
    <div>
<!-- 底部 -->
   <div class="footer">
    
  <ul class="address">
    <li>江苏龙城校区</li>
    <li>邮编：{{postcode}}</li>
   <li>地址： {{address}}</li>
   </ul>
  <div class="copyright">   版权所有：山西农业大学   晋ICP备05000473号        晋公网安备14072602000114号</div>
   <img src="../assets/resource/image/底部.png" alt="" class="img">
   </div> -->
   
<!-- /底部 -->
 
    </div>
</template>
<script>
import {get} from '../utils/request'
export default {
    data(){
        return {
            address:"",
            postcode:""
        }
    },
    methods:{
      //加载地址
        loadAddress(){
          //url代表根据name查询配置信息
            let url='/index/findByKey';
            get(url,{name:'address'}).then(res=>{
                let data=res.data;
                if(data){
                    this.address=data.val;
                }
            })
        },
        //加载邮编
        loadPostcode(){
            let url='/index/findByKey';
            get(url,{name:'postcode'}).then(res=>{
                let data1=res.data;
                if(data1){
                    this.postcode=data1.val;
                }
            })
        }
    },
    created(){
        this.loadAddress()
        this.loadPostcode()
    }
}
</script>
<style lang="scss">
//底部样式
.footer{
  height:230px;
  background-color: #028b39;
  color:#fff;
  position:relative;
  display:flex;
  // justify-content: space-between;
  flex-wrap: nowrap;
  //overflow: hidden;
  .address{
    width: 400px;
    height: 75px;
    position:absolute;
    top:50px;
    left:200px;
  }
  li{
    margin-bottom:10px;
  }
  .copyright{
     position:absolute;
     top:140px;
     left:200px;
  }
  .img{
   height: 200px;
  //  float:right;
   margin-top:20px;
   margin-left:1000px;
  }
  .footer::after{
    display:block;
    content:"";
     clear:both;
   }
  
 }
</style>
